import React, { PureComponent } from 'react';
import Item from '../Item';
import { Items } from '../Common';

class ItemPanel extends PureComponent {
  render() {
    const { onItemClick } = this.props;
    return (
      <div>
        {Items.map(item => {
          return <Item key={item.type} data={item} onItemClick={onItemClick} />;
        })}
      </div>
    );
  }
}

export default ItemPanel;
